
import {createReducer} from '../../../redux/createReducer'

const User_Info_fetch_UserInfo = 'User_Info_fetch_UserInfo'

const store = {
  state: {
    userInfo: 'yyy'
  },
  action: {
    fetchUserInfo (params) {
      return {
        type: User_Info_fetch_UserInfo,
        payload: params
      }
    }
  },
  reducer: {
    [User_Info_fetch_UserInfo] (prevState = [], {type, payload}) {
      return {
        ...prevState,
        userInfo: payload.userInfo
      }
    }
  }
}

export default createReducer(store)

export const action = store.action